package com.lhl.quarztdistribution;

import lombok.extern.slf4j.Slf4j;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;
@Slf4j
public class MyJob extends QuartzJobBean{

    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        log.debug("开始执行"+DateUtils.getDateStr("yyyy-MM-dd HH:mm:ss"));
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        log.debug("结束执行"+DateUtils.getDateStr("yyyy-MM-dd HH:mm:ss"));
    }

}
